package com.lxd.zaitu2.control;

import com.lxd.zaitu2.dao.StudentDao;
import com.lxd.zaitu2.dao.TeacherDao;
import com.lxd.zaitu2.entity.Student;
import com.lxd.zaitu2.entity.Teacher;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author:geQiang
 * @version:1.0
 * @date:2019/7/16
 * @description:com.lxd.zaitu2.control
 */
@RestController
@RequestMapping("/student")
public class StudentController {
    @Autowired
    private StudentDao studentDao;
    @Autowired
    private TeacherDao teacherDao;
    @GetMapping("/all")
    public Iterable<Student> findAll(){
        return studentDao.findAll();
    }
}
